import request from '@/utils/request'

// 测试用户登录
export function testLogin(data) {
  return request({
    url: `/admService/edu_teacher/adminLogin`,
    method: 'post',
    data: data
  })
}

//根据token获取用户信息
export function getTeacherInfo() {
  return request({
    url: `/admService/edu_teacher/getTeacherInfo`,
    method: 'get'
  })
}

//根据token获取用户信息
export function getTeacherInfo1(token) {
  return request({
    url: `/admService/edu_teacher/getTeacherInfo/${token}`,
    method: 'get'
  })
}

//获取提交的材料类别
//根据token获取用户信息
export function getBus() {
  return request({
    url: `/admservice/subject/getBus`,
    method: 'get'
  })
}
//教师提交材料
export function subFile(formData,fileName,categoryId) {
  return request({
    url: `/admService/edu_teacher/subFile/${fileName}/${categoryId}`,
    method: 'post',
    data:formData
  })
}
//教师提交材料历史总表
export function historyAll(page,limit) {
  return request({
    url: `/admService/edu_teacher/historyAll/${page}/${limit}`,
    method: 'get'
  })
}
//教师提交材料历史待审核表
export function historyWait(page,limit) {
  return request({
    url: `/admService/edu_teacher/historyWait/${page}/${limit}`,
    method: 'get'
  })
}
//教师提交材料历史结果表
export function historyResult(page,limit) {
  return request({
    url: `/admService/edu_teacher/historyResult/${page}/${limit}`,
    method: 'get'
  })
}
//教师提交结果传到OSS
export function subFileOss(formData,fileName,categoryId) {
  return request({
    url: `/admservice/fileoss/subFileOss/${fileName}/${categoryId}`,
    method: 'post',
    data:formData
  })
}
//撤销用户的上传文件
export function removeOneWait(id) {
  return request({
    url: `/admservice/fileoss/removeFileOss/${id}`,
    method: 'post',
  })
}
// 项目申报前端展示
export function historyApplication(page,limit,projectQuery) {
  return request({
    url: `/admservice/fileoss/historyApplication/${page}/${limit}`,
    method: 'post',
    data:projectQuery
  })
}
// 获取项目申报的申报类别
export function getProApplication() {
  return request({
    url: `/admservice/fileoss/getProApplication`,
    method: 'get',
  })
}
// 项目申报提交
export function lookApplication(id,caId) {
  return request({
    url: `/admservice/fileoss/lookApplication/${id}/${caId}`,
    method: 'post',
  })
}
// 项目申报待审核
export function waitApplication(page,limit) {
  return request({
    url: `/admservice/fileoss/waitApplication/${page}/${limit}`,
    method: 'get'
  })
}
//撤销申报待批阅
export function removeOneWaitApp(id) {
  return request({
    url: `/admservice/fileoss/removeOneWaitApp/${id}`,
    method: 'post',
  })
}
//教师申报审阅结果表
export function historyResultApp(page,limit,approvalQuery) {
  return request({
    url: `/admservice/fileoss/historyResultApp/${page}/${limit}`,
    method: 'post',
    data:approvalQuery
  })
}
//总评
export function getGen() {
  return request({
    url: `/admservice/fileoss/getGen`,
    method: 'get'
  })
}
//首页名称
export function getName() {
  return request({
    url: `/admservice/fileoss/getName`,
    method: 'get'
  })
}

// 退出
export function logOut() {
  return request({
    url: `/admservice/fileoss/logOut`,
    method: 'post'
  })
}
//显示哪个需要签到哪个不需要
export function selectClass() {
  return request({
    url: `/admservice/timesystem/selectClass`,
    method: 'get'
  })
}
//找到签到时间
export function selectTime() {
  return request({
    url: `/admservice/timesystem/selectTime`,
    method: 'get'
  })
}
//按钮点击后的操作
export function fetchScheduleData(dayOfWeek,num) {
  return request({
    url: `/admservice/timesystem/selectUpClass/${dayOfWeek}/${num}`,
    method: 'get'
  })
}
